package sctu.edu.java.year2016.team01.xuhanmei.day20160525.chapter7_2;

/**
 * Created by Administrator on 2016/5/25.
 * 长宽作为矩形类的属性，在构造方法中将长，宽初始化，定义一个成员方法求此矩形的面积。
 */
class JuXing {
    public double chang;
    public double width;


    public JuXing() {
        this.chang=chang;
        this.width=width;
    }


    public void area1(double chang, double width) {
        System.out.println("这个矩形的面积是：" + (chang * width));
    }
}


public class Rectangle {
    public static void main(String[] args) {
        JuXing a = new JuXing();
        a.area1(10.0d, 34.5d);
    }
}
